<template>
  <div v-if="true" class="app-container">
    <div class="login-container">
      <div class="left">
        <div class="logo-container">
          <img class="logo-img" src="@/assets/imgs/logo.png"/>
          <div class="logo-text">AIOps</div>
        </div>
      </div>
      <div class="right">
        <LoginInfo v-model="option"/>
        <LoginReset v-model="option"/>
        <LoginRegister v-model="option"/>
        <el-row v-if="false" class="server-container">
          <el-col :span="14">
            <el-link
                style="float: right"
                type="primary"
                @click="option = 'reset'"
            >忘记密码
            </el-link>
          </el-col>
          <el-col :span="5">
            <el-link
                style="float: right"
                type="primary"
                @click="option = 'register'"
            >注册
            </el-link>
          </el-col>
          <el-col :span="5" style="display: flex;justify-content: flex-end">
            <img alt="" class="server-img" src="@/assets/imgs/kefu.png"/>
          </el-col>
        </el-row>
      </div>
    </div>
  </div>
</template>

<script name="LoginBar" setup>
import {ref} from "vue"
import LoginInfo from "@/views/login/Info.vue";
import LoginReset from "@/views/login/Reset.vue";
import LoginRegister from "@/views/login/Register.vue";


const option = ref('login')

</script>

<style lang="scss" scoped>
.app-container {
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;

  .login-container {
    width: 140vh;
    height: 70vh;
    background-color: #ffffff;
    border-radius: 8px;
    display: flex;

    .left {
      width: 50%;
      height: 100%;
      background-color: #ffffff;
      border-radius: 8px 0 0 8px;
      display: flex;
      align-items: center;
      justify-content: center;

      .logo-container {
        display: flex;
        align-items: center;

        .logo-img {
          width: 150px;
          height: 150px;
          border: 0;
        }

        .logo-text {
          font-size: 60px;
          font-weight: bold;
          color: #000000;
          margin-left: 20px;
        }
      }
    }

    .right {
      width: 50%;
      height: 100%;

      .server-container {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        margin-top: -20px;

        .server-img {
          height: 70px;
          width: 70px;
          margin: 0 10px 10px 0;
        }
      }
    }
  }
}
</style>